/*
** rev_video.c for rev_video in /home/nadali_t//local/svn/tek2ed/my_select/TP/rev_video
** 
** Made by thomas nadalie
** Login   <nadali_t@epitech.net>
** 
** Started on  Mon Nov 19 11:51:03 2012 thomas nadalie
** Last update Mon Nov 19 11:51:04 2012 thomas nadalie
*/

#include	<unistd.h>
#include	<curses.h>
#include	<term.h>
#include	<termios.h>

int		my_putchar(int c)
{
  write(1, &c, 1);
  return (0);
}

void		my_putstr(char *str)
{
  int		i;

  i = 0;
  while (str[i])
    my_putchar(str[i++]);
}

int		main()
{
  char		str[1024];

  tgetent(NULL, "xterm");
  my_putstr("Enter text : ");
  tputs(tgetstr("mr", NULL), 2, my_putchar);
  read(0, str, 1024);
  tputs(tgetstr("me", NULL), 2, my_putchar);
  return (0);
}
